/*
 * test.cpp
 *
 *  Created on: 2008-12-14
 *      Author: Administrator
 */

#include "BinaryTree.h"
#include <conio.h>
#include <iostream>
using std::cout;
using std::endl;

int main(void)
{
	BinaryTree<int> A[5];
	for(int j=0; j<5; j++)
		A[j].SetRoot(10*(j+1));

	A[0].CreateTree(A[1], A[2]);
	A[2].CreateTree(A[3], A[4]);
	cout<<endl;
	A[0].InOrder();
	cout<<endl;
	A[0].PreOrder();
	cout<<endl;
	A[0].PostOrder();
	cout<<endl;
	A[2].InOrder();
	cout<<endl;
	A[0].LevelOrder();
	cout<<endl;
	A[0].LeftSibling();
	A[3].RightSibling();
	A[0].Visit(A[3].LeftSibling());
	getch();
	return 0;
}
